package host.skiree.nettydemo.server.service.impl;

import host.skiree.nettydemo.message.Message;
import host.skiree.nettydemo.message.PongMessage;
import host.skiree.nettydemo.server.service.MessageHandler;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author gcl
 * @date 2022/9/19 9:16
 */
public class Ping implements MessageHandler {
    @Override
    public void handleMessage(ChannelHandlerContext ctx, Message message) {
        ctx.writeAndFlush(new PongMessage());
    }
}
